package com.eqdd.yiqidian.utils;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;

import com.eqdd.yiqidian.base.BaseApplication;

/**
 * @author吕志豪 .
 * @date 18-1-17  上午8:49.
 * Github :https://github.com/lvzhihao100
 * E-Mail：1030753080@qq.com
 * 简书 :http://www.jianshu.com/u/6e525b929aac
 */

public class CopyUtil {
    public static void copy(String content) {
        ClipboardManager cm = (ClipboardManager) BaseApplication.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
        // 将文本内容放到系统剪贴板里。
        cm.setPrimaryClip(ClipData.newPlainText("Lable", content));
        ToastUtil.showShort("已复制");
    }
}
